Skip to content

Add custom_event and webview reload Platform APIs#76

Merged
dominicletz merged 1 commit into
mainfrom
feat/custom-event-and-webview-reload
Jul 22, 2026
Merged

Add custom_event and webview reload Platform APIs#76
dominicletz merged 1 commit into
mainfrom
feat/custom-event-and-webview-reload

Conversation

@dominicletz

Copy link
Copy Markdown
Collaborator

Summary

  • Adds Desktop.Platform.System.custom_event/2 for mobile-native events ([:custom_event, event, args] wire format) — replaces Hex Bridge GenServer.call
  • Adds Desktop.Platform.Content.reload/1 and Desktop.Window.reload/1 — replaces :wxWebView.reload/1
  • Wx/Browser: custom_event is a no-op; Browser reload is a no-op; Json/Wx reload via bridge or OTP wx
  • Docs, mock handlers, guards, and tests

Needed by diode-drive after the Bridge embed: share/save/restart custom events and UI webview reload still used the removed Hex Bridge / raw :wxWebView paths on Android.

Test plan

  • NO_WX=1 mix test test/desktop/backend/json_test.exs test/desktop/backend/browser_test.exs test/desktop/platform_system_test.exs test/desktop/regression/beam_wx_calls_test.exs --exclude wx
  • mix test.guard
  • xvfb-run mix test.wx for Wx reload coverage

Made with Cursor

Provide Desktop.Platform.System.custom_event/2 for mobile bridge
custom events (replacing Hex Bridge GenServer calls) and
Desktop.Window.reload/1 plus Content.reload/1 as the backend-safe
replacement for :wxWebView.reload/1.

Co-authored-by: Cursor <[email protected]>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@dominicletz
dominicletz merged commit d05fdd8 into main Jul 22, 2026
2 checks passed
@dominicletz
dominicletz deleted the feat/custom-event-and-webview-reload branch July 22, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant